﻿@{

    Layout = null;
    string buyError = TempData["BuyError"]?.ToString();
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title-网上书城</title>
    <link rel="stylesheet" href="~/conjs/global.css" />
    <link href="~/conjs/cityLayout.css" type="text/css" rel="stylesheet">
    <link rel="stylesheet" href="~/conjs/Site.css" />
    <style>
        .error-page {
            max-width: 600px;
            margin: 100px auto;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 4px 8px rgba(0,0,0,0,0.1);
            text-align: center;
        }

        .alert-danger {
            margin-bottom: 20px;
        }

        .btn-back {
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <div class="error-page">
        <h2>支付失败</h2>
        @if (!string.IsNullOrEmpty(buyError))
        {
            <div class="alert alert-danger">
                @buyError
            </div>
            TempData.Remove("BuyError"); // 清除错误信息，防止重复显示
        }
        <a href="@Url.Action("Index", "BookDetailsInfo")" class="btn btn btn-primary btn-back">
            <i class="fas fa-arrow-left"></i> 返回首页
        </a>
    </div>

    <script src="https://code.jquery.com/jquery-3.3.3.1.slim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.3.1/js/bootstrap.min.js"></script>
</body>
</html>